package com.pronhub.cloud.shop.web.feign;

import com.pronhub.cloud.shop.domain.Good;
import com.pronhub.cloud.shop.feign.GoodFeignApi;
import com.pronhub.cloud.shop.server.IGoodService;
import com.pronhub.shop.cloud.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class GoodFeignClient implements GoodFeignApi{

    @Autowired
    private IGoodService goodService;
    @Override
    public Result<List<Good>> query(List<Long> ids) {
        return Result.success(goodService.queryByIds(ids));
    }
}
